function RegexPaeseUrl(url) {
    let params = {}
    url.replace(/([^?&=]+)=([^&]+)/g,(_,key,value)=>  params[key]=value)
    return params
}
console.log(RegexPaeseUrl('https://www.baidu.com?name=kang&age=27'));